<?php
/**
 * Created by PhpStorm.
 * User: zing
 * Date: 2018/5/5
 * Time: 10:14
 */

echo 0.00 . PHP_EOL;
if (0.00) {
    echo "0.00 -> true" . PHP_EOL;
} else {
    echo "0.00 -> false" . PHP_EOL;
}

if (0 != 0.00) {
    echo "0 != 0.00" . PHP_EOL;
} else {
    //true
    echo "0 == 0.00" . PHP_EOL;
}

if (0 != -0.00) {
    echo "0 != -0.00" . PHP_EOL;
} else {
    //true
    echo "0 == -0.00" . PHP_EOL;
}


if (0 !== 0.00) {
    //true
    echo "0 !== 0.00" . PHP_EOL;
} else {
    //true
    echo "0 === 0.00" . PHP_EOL;
}


$total_price = 2390;
$target_disc_price = 88;
$target_calc_price = 2302.00;
$diff = $total_price - $target_calc_price - $target_disc_price;
echo $diff . PHP_EOL;
if ($total_price != $target_calc_price + $target_disc_price) {
    echo "$total_price != $target_calc_price + $target_disc_price" . PHP_EOL;
}else{
    echo "$total_price == $target_calc_price + $target_disc_price" . PHP_EOL;
}